home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 342_01.zip / I8255PC.H < prev    next >
Text File  |  1993-04-03  |  3KB  |  74 lines

  1. /*-
  2.  *  ----------------------------------------------------------------------
  3.  *  File        :   I8255PC.H
  4.  *  Creator     :   Blake Miller
  5.  *  Version     :   01.01.00        February 1991
  6.  *  Language    :   Microsoft C     Version 5.1
  7.  *  Purpose     :   Intel 8255 Compatible Digital IO Functions
  8.  *              :   Definitions for the IBM PC 8255.
  9.  *              :   It is located at 80X86 port address 60H.
  10.  *  ----------------------------------------------------------------------
  11.  */
  12.  
  13. /*- The 8255 in the PC has several assorted purposes
  14.  *  assigned to its ports.
  15.  *  Port A is configured for input.
  16.  *  It can be set to read the keyboard scan code or
  17.  *  the hardware SW1 settings.
  18.  *  Port B is configured for output.
  19.  *  It has some general control signals.
  20.  *  Port C is set for input.
  21.  *  It has CL set aside for the hardware SW1 settings
  22.  *  and CH for some general purpose indicators.
  23.  */
  24.  
  25. #define PCPPI_HSW1_PORT   1     /* hardware switch 1 input port     */
  26. #define PCPPI_KBSC_PORT   1     /* keyboard scan code input port    */
  27. #define PCPPI_HSW2_PORT   3     /* hardware switch 2 input port     */
  28. #define PCPPI_SPKR_PORT   2     /* speaker control output port      */
  29.  
  30. /*- Port bit numbers should be from 1 - 24 as follows:
  31.  *   1 = Port A Bit 0;   8 = Port A Bit 7
  32.  *   9 = Port B Bit 0;  16 = Port B Bit 7
  33.  *  17 = Port C Bit 0;  24 = Port C Bit 7
  34.  */
  35.  
  36. #define PCPPI_SW10   1      /* selected SW1 inputs  */
  37. #define PCPPI_SW11   2
  38. #define PCPPI_SW12   3
  39. #define PCPPI_SW13   4
  40. #define PCPPI_SW14   5
  41. #define PCPPI_SW15   6
  42. #define PCPPI_SW16   7
  43. #define PCPPI_SW17   8
  44.  
  45. #define PCPPI_TC2G   9      /* timer counter 2 gate */
  46. #define PCPPI_SPKR  10      /* speaker enable bit   */
  47.  
  48. /*  When low   the switches 0 - 4 are read into PC0.
  49.  *  When high, the switches 5 - 8 are read into PC0.
  50.  */
  51. #define PCPPI_PC0C  11      /* PC0 control inputs           */
  52. #define PCPPI_CSMO  12      /* cassette motor off           */
  53. #define PCPPI_EMPC  13      /* enable memory parity check   */
  54.  
  55. #define PCPPI_EICC  14      /* enable IO channel check      */
  56. #define PCPPI_EKBD  15      /* disable keyboard             */
  57. #define PCPPI_SCSW  16      /* PA scan code / switch select */
  58.  
  59. #define PCPPI_SW20  17      /* selected SW2 inputs          */
  60. #define PCPPI_SW21  18
  61. #define PCPPI_SW22  19
  62. #define PCPPI_SW23  20
  63.  
  64. #define PCPPI_CSDI  21      /* cassette data in                 */
  65. #define PCPPI_TC2O  22      /* timer counter 2 output           */
  66. #define PCPPI_IOCC  23      /* disable IO channel check         */
  67. #define PCPPI_OBMC  24      /* disable on board memory check    */
  68.  
  69. /*-
  70.  *  ----------------------------------------------------------------------
  71.  *  END I8255PC.H Source File
  72.  *  ----------------------------------------------------------------------
  73.  */
  74.